package JD;


import java.util.Scanner;

public class Main_0909_3 {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int k=cin.nextInt();
        StringBuffer sb=new StringBuffer();
        if (k<=3){
            for (int i = 0; i < k; i++) {
                sb.append("1");
            }
            System.out.println(sb.toString());
            return;
        }
        //恰好k个字符串，所以反过来求n个1能映射成多少个字符串，然后结果随n递增，可以二分
        int left=1,right=k;
        while (left<right){
            int mid=left+(right-left)/2;
            if (getCount(mid)==k){
                System.out.println(getString(mid));
                return;
            }else if (getCount(mid)>k){
                right=mid-1;
            }else {
                left=mid+1;
            }
        }
        System.out.println(-1);
    }
    static int getCount(int n){
        if (n<=3) return n;
        //求n个1能映射成多少的字符串
        int[] dp=new int[n+1];
        dp[1]=1;
        dp[2]=2;
        for (int i = 3; i < n+1; i++) {
            dp[i]=dp[i-1]+dp[i-2];
        }
        return dp[n];
    }
    static String getString(int n){
        StringBuffer sb=new StringBuffer();
        for (int i = 0; i < n; i++) {
            sb.append("1");
        }
        return sb.toString();
    }
}
